package com.mall.order.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.List;

/**
 * @Description:
 * @Author: WD created on 2021-09-29 19:42
 * @Version:
 */
@Data
public class OrderListVO {
    private OrderDetailInfo[] data;

    /**
     * 总记录数
     */
    private Long total;


    public OrderListVO(List<OrderDetailInfo> infoList, Long total) {
        if (infoList!=null) {
            this.data =  infoList.toArray(new OrderDetailInfo[0]);
        }else {
            this.data=new OrderDetailInfo[0];
        }
        this.total = total;
    }
}